import request from "@/utils/request";
import type { GetUserListRes, addUserList } from "./model/userModel";

enum Api {
  getUserUrl = "/admin/acl/user",
  addUserUrl = "/admin/acl/user/save",
}

export const getUserApi = (page: number, limit: number) => {
  return request.get<any, GetUserListRes>(Api.getUserUrl + `/${page}/${limit}`);
};

export const addUserApi = (data: addUserList) => {
  return request.post<any, null>(Api.addUserUrl, data);
};
